# import ssl
from flask import Flask
from app.MyCas import MyCas
from config.Config import Config


app = Flask(__name__)


cas = MyCas(app, "/data_aggregation")
cas.init_app(app)
# 此处填写server端地址
app.config['CAS_SERVER'] = Config.CAS_SERVER
# 填写cas登录后跳转的路由
app.config['CAS_AFTER_LOGIN'] = Config.CAS_AFTER_LOGIN
app.config['SECRET_KEY'] = Config.SECRET_KEY
app.config['CAS_LOGIN_ROUTE'] = Config.CAS_LOGIN_ROUTE
app.config['CAS_VALIDATE_ROUTE'] = Config.CAS_VALIDATE_ROUTE
# 全局取消证书验证
# ssl._create_default_https_context = ssl._create_unverified_context
